﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SceneManagement;

public class MainMenuEvents : MonoBehaviour
{
    private void Awake()
    {
        if (GlobalData.SaveNextScene == -1)
            GameObject.Find("Continue Game").GetComponent<Button>().interactable = false;
    }
    public void NewGame()
    {
        SceneManager.LoadScene(1);
    }
    public void ContinueGame()
    {
        SceneManager.LoadScene(GlobalData.SaveNextScene);
    }
    public void Extra()
    {
        gameObject.SetActive(false);
        GameObject.Find("ExtraMenu").SetActive(true);
    }
    public void ExitGame()
    {
        Application.Quit();
    }
}
